window.addEventListener("load", function() { draw(); }, false); 

function draw(){
document.getElementById("aimCreate").addEventListener("click",function(){CreerCompte();}, false);
}

function CreerCompte()
{
	var addr = document.getElementById("addr").value;
	var size = document.getElementById("size").value;
	var nom = document.getElementById("name").value;
	var pre = document.getElementById("pre").value;
	var pas = document.getElementById("password").value;
	
	var obj = new ServiceJeu("http://" + addr);
	obj.init();
	console.log("la : " + obj.postUsers(nom, pre, pas));
	
	var idCan = document.getElementById("go");
	console.log(size);
	var objGo = new go(idCan,parseInt(size));
	objGo.init();
}


/*
<?xml version="1.0" encoding="utf-8" ?>
<goimerir version="1.0">
	<create_board>
		<name value="Pierre vs Nadia (2011-10-04@21h30)" />
		<owner value="pgrabolosa" />!
		<invitee value="nadia" />!
		<size value="9x9" />!
		<owner_white value="true" />!
	</create_board>
</goimerir>
*/
